//
import request from '@/utils/request'
// 售货机列表
const getShj = (data) => request.get('/api/vm-service/vm/search', {
  params: {
    ...data
  }
})
// 新增-选择型号
const xinghao = (data) => request.get('/api/vm-service/vmType/search', {
  params: {
    ...data
  }
})
// 新增-选择点位
const dianwei = (data) => request.get('/api/vm-service/node/search', {
  params: {
    ...data
  }
})
// 新增设备
const addSb = (data) => request.post('/api/vm-service/vm', data)

// 策略
const sbCl = () => request.get('/api/vm-service/policy')
// 批量操作策略
const sbClAll = (data) => request.put('/api/vm-service/vm/applyPolicy', data)
// 查询产品策略
const ckCpCl = (innerCode) => request.get(`/api/vm-service/policy/vmPolicy/${innerCode}`)
// 取消策略
const qxCl = (data) => request.put(`/api/vm-service/vm/cancelPolicy/${data.innerCode}/${data.policyId}`)
// 修改售货机点位
const xgShjDw = (data) => request.put(`/api/vm-service/vm/${data.id}/${data.nodeId}`)
export {
  getShj,
  xinghao,
  dianwei,
  addSb,
  sbCl,
  sbClAll,
  ckCpCl,
  qxCl,
  xgShjDw
}
